﻿using pcEntity;
using System.Linq;

namespace pcDAL
{
    public class CommonDAL
    {
        public bool CheckIfRandomNumberExists(int number)
        {
            bool retVal = false; string strNumber = number.ToString();
            using (PunchClockEntities context = new PunchClockEntities())
            {
                if (context.tCompanies.Where(x => x.registerCode.Equals(strNumber)).Count() > 0)
                    retVal = true;
            }
            return retVal;
        }
    }
}
